package com.hopes.bizz.risk.control.vo;

import com.alibaba.fastjson.JSONObject;
import com.hopes.bizz.common.core.util.StringUtils;
import com.hopes.bizz.risk.common.constant.enums.RiskModDictEnum;
import com.hopes.bizz.risk.common.constant.enums.RiskSysDictEnum;
import com.hopes.bizz.risk.control.entity.RiskUnitEntity;
import com.hopes.bizz.risk.control.entity.RiskUnitStopEntity;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import com.hopes.boss.admin.api.resolver.enums.SysDictEnum;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * @author daijie
 * @version 1.0
 * @date 2023/7/18 10:16
 * @Description:
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "停用检维修VO")
public class RiskUnitStopVO extends RiskUnitStopEntity {

    private static final long serialVersionUID = 1L;

    @Schema(description="id")
    private Long id;

    @Schema(description="风险单元标识")
    private Long riskUnitId;

    @Schema(description="风险对象")
    private Long riskObjectId;

    @Schema(description="停用类型")
    private Integer stopType;

    @Schema(description="停用开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date stopStartTime;

    @Schema(description="停用结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date stopEndTime;

    @Schema(description="原因")
    private String stopReason;

    @Schema(description="备注")
    private String remarks;

    @Schema(description="机构ID")
    private Long orgId;







    public String getRiskObjectIdStr() {
        return DictResolver.getItemLabelByValue(RiskModDictEnum.risk_object, this.getRiskObjectId());
    }
}
